<?php
/**
 * Created by PhpStorm.
 * User: wangmx
 * Date: 2016/11/17
 * Time: 17:50
 */

namespace App\Http\Routes;

use Illuminate\Contracts\Routing\Registrar;

class SupplierRoute
{
    public function map(Registrar $router)
    {
        $router->group(['middleware' => ['web', 'auth', 'permissions.check'],
            'prefix' => 'backstage/supplier/'], function ($router) {
            $router->get('list', ['uses' => 'Backstage\SupplierBackController@supplierList'])->name('get.supplier.list');
            $router->get('add', ['uses' => 'Backstage\SupplierBackController@addSupplier'])->name('get.supplier.list.add');
            $router->get('delete', ['uses' => 'Backstage\SupplierBackController@delete'])->name('get.supplier.list.delete');
            $router->get('detail', ['uses' => 'Backstage\SupplierBackController@detail'])->name('get.supplier.list.detail');
            $router->post('add-supplier', ['uses' => 'Backstage\SupplierBackController@postAddSupplier'])->name('post.supplier.list.add-supplier');
            $router->get('edit', ['uses' => 'Backstage\SupplierBackController@edit'])->name('get.supplier.list.detail.edit');
            $router->post('edit-supplier', ['uses' => 'Backstage\SupplierBackController@postEditSupplier'])->name('post.supplier.list.detail.edit-supplier');

        });
    }
}
